const Router = require("koa-router");
const verifyParams = require("../middleware/validator");
const router = new Router({ prefix: "/cart" });
const { verifyToken, hasAdminPer } = require("../middleware/user.middleware");
const { add, getlist } = require("../controller/cart");
router.post("/add", verifyToken, hasAdminPer, add);
router.get("/getlist", getlist);
router.delete(
  "/:id",

  (ctx, next) => {
    console.log(ctx.request.body, "next1");
    console.log(ctx.request.params, "next2");
    ctx.body = 1;
  }
);
module.exports = router;
